import request from '../../utils/request.js'
//获取作业列表
export const getWorkListAPI=(params)=>{
  return request({
    url:'/teacher/task',
    method:'get',
    params:params
  })
}
//新增作业
export const createWorkAPI=(form)=>{
  return request.post('/teacher/task/add',form)
}

//获取作业详情
export const getWorkInfoAPI=(id)=>{
  return request({
    url:'/teacher/task/id',
    method:'get',
    params:{
      "taskId":id
    }
  })
}

//修改作业
export const updataWorkInfoAPI=(formWork)=>{
  return request({
    url:'/teacher/task',
    method:'put',
    data:formWork
  })
}

//删除作业
export const deleteWorkAPI=(id)=>{
  return request({
    url:'/teacher/task',
    method:'delete',
    params:{
      "taskId":id
    }
  })
}

//提醒学生交作业
export const remindStudentAPI=(id)=>{
  return request({
    url:'/teacher/task/remind',
    method:'get',
    params:{
      taskId:id
    }
  })
}

//获取下拉框数据
export const getSelectAPI=()=>{
  return request({
    url:'/teacher/task/ccList',
    method:'get',
  })
}

 //单个删除修改的作业题目
 export const deleteUpdatetimuAPI=(params)=>{
  return request({
    url:'/teacher/task/question',
    method:'delete',
    params:{
      taskId:params.taskId,
      questionId:params.questionId
    }
  })
 }

//二级
//获取作业成绩
export const getWorkScoreAPI=(params)=>{
  return request({
    url:'/teacher/mark',
    method:'get',
    params:params
  })
}

//提醒该学生作业
export const remindStudentWorkAPI=(id)=>{
  return request({
    url:'/teacher/mark/remind',
    method:'get',
    params:{
      markId:id
    }
  })
}

//获取该学生成绩详情
 export const getStudentWorkScoreInfoAPI=(id)=>{
  return request({
    url:'/teacher/mark/markId',
    method:'get',
    params:{
      markId:id
    }
  })
 }
//提交修改该学生成绩详情
export const submitUpdateStudentWorkScoreAPI=(params)=>{
  return request({
    url:'/teacher/mark',
    method:'put',
    data:params
  })
}

//第三级
// 获取学生作业详情
export const getStudentWorkInfoAPI=(params)=>{
  return request({
    url:'/teacher/mark/markDetail',
    method:'get',
    params:{
      markId:params
    }
  })
}
//提交修改的学生成绩
export const submitUpdateStudentWorkInfoAPI=(params)=>{
  return request({
    url:'/teacher/mark',
    method:'put',
    data:params
  })
}
